import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Aboutour from '../components/Aboutour'
import Allgoods from '../components/Allgoods'
import Share from '../components/Share'
import Login from '../components/Login'
import Reg from '../components/Reg'
import Member from '../components/Member.vue'
import Search from '../components/Search'
import ClassDetail from '../components/ClassDetail'
import Order from '../components/iviews/Order.vue'
import BookDetail from '../components/BookDetail'
import Consignee from '../components/iviews/Consignee.vue'
import Form from '../components/iviews/Form.vue'
import Collect from '../components/iviews/Collect.vue'
import Mine from '../components/iviews/Mine.vue'
import Password from '../components/iviews/Password.vue'
import Guanxuan from '../components/iviews/Guanxuan.vue'
import Consult from '../components/iviews/Consult.vue'
import ShopCar from '../components/ShopCar.vue'
import SearchClassDetail from '../components/SearchClassDetail'
import Ordercommit from '../components/Ordercommit'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/Aboutour',
      name: 'aboutour',
      component: Aboutour
    },
    {
      path: '/Allgoods',
      name: 'allgoods',
      component: Allgoods
    },
    {
      path: '/Share',
      name: 'share',
      component: Share,
      children: [
        {
          path: 'guanxuan',
          name:'guanxuan',
          component: Guanxuan
        },
        {
          path: 'consult',
          name:'Consult',
          component: Consult
        }
      ]
    },
    {
      path: '/Login',
      name: 'login',
      component: Login
    },
    {
      path: '/Search',
      name: 'search',
      component: Search
    },
    {
      path: '/reg',
      name: 'Reg',
      component: Reg
    },
    {
      path: '/member',
      component: Member,
    },
    {
      path: '/order',
      name: 'Order',
      component: Order
    },
    {
      path: '/ClassDetail/:type',
      name: 'classDetail',
      component: ClassDetail
    },
    {
      path: '/BookDetail/:par',
      name: 'bookDetail',
      component: BookDetail
    },
    {
      path: '/consignee',
      name: 'Consignee',
      component: Consignee
    },
    {
      path: '/form',
      name: 'Form',
      component: Form
    },
    {
      path: '/collect',
      name: 'Collect',
      component: Collect
    },
    {
      path: '/mine',
      name: 'Mine',
      component: Mine
    },
    {
      path: '/password',
      name: 'Password',
      component: Password
    },
    {
      path: '/ShopCar',
      name: 'ShopCar',
      component: ShopCar
    },
    {
      path: '/SearchClassDetail',
      name: 'searchClassDetail',
      component: SearchClassDetail
    },
    {
      path: '/Ordercommit',
      name: 'ordercommit',
      component: Ordercommit
    }
  ]
})
